package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

type seatRouter struct {
}

func (*seatRouter) SeatRouterGroup(Router *gin.RouterGroup) *gin.RouterGroup {
	seat := Router.Group("seat")
	seatApi := api.SeatApi{}
	{
		//新增数据
		seat.POST("add", seatApi.AddSeat)
		//返回模板
		seat.GET("exel", seatApi.SeatExel)
		//根据模板导入
		seat.POST("batch-add", seatApi.BatchAddSeat)
		//删除数据
		seat.GET("del", seatApi.DelSeat)
		//批量删除数据
		seat.POST("batch-del", seatApi.BatchDelSeat)
		//修改数据
		seat.POST("update", seatApi.UpdateSeat)
		//查询全部数据
		seat.GET("", seatApi.QuerySeat)
		//校区列表
		seat.GET("list_campus", seatApi.QuerySeatTabulationCampus)
		//楼栋列表
		seat.GET("list_building", seatApi.QuerySeatTabulationBuilding)
		//教室列表
		seat.GET("list_classroom", seatApi.QuerySeatTabulationClassroom)
		//根据条件搜索座位
		seat.GET("condition", seatApi.QueryConditionSeat)
		//根据id查找座位信息
		seat.GET("query-id", seatApi.QueryId)

		seat.GET("list_all", seatApi.QueryListAll)
	}
	return seat
}
